package com.daxia.ogmall.common;

/**
 * 验证码类型
 */
public enum ValidateCodeTypes {

    ResetPassword(2, "重置密码", "[重置密码]验证码: {code}."),
    Register(1, "注册", "您本次注册的验证码为{code}"); 

    private int value;
    private String remark;
    private String message;

    private ValidateCodeTypes(int value, String remark, String message) {
        this.value = value;
        this.remark = remark;
        this.message = message;
    }

    public int getValue() {
        return value;
    }

    public String getRemark() {
        return remark;
    }
    
    public String getMessage() {
        return message;
    }

    public static ValidateCodeTypes getByValue(int value) {
        for (ValidateCodeTypes o : ValidateCodeTypes.values()) {
            if (o.getValue() == value) {
                return o;
            }
        }
        return null;
    }
}